package com.liang.design;

import com.liang.design.util.RedisUtils;

/**
 * @author lsm
 * @ClassName ActivityController.java
 * @Description TODO
 * @createTime 2023年12月05日 10:37:00
 */
public class ActivityController {

    private RedisUtils redisUtils = new RedisUtils();

    public Activity queryActivityInfo(Long id){
        Activity activity = ActivityFactory.getActivity(id);
        //模拟库存
        Stock stock = new Stock(1000,redisUtils.getStockUsed());
        activity.setStock(stock);
        return activity;
    }
}
